<template>
  <el-form-item :class="attributes?.customClassName?.formItemClassName ?? ''" v-bind="attributes.formItem">
    <template
      v-for="item in attributes?.formItem?.slotScope ?? []"
      :key="item.slotName"
      v-slot:[item.slotName]="scope">
      <component :is="item.render(scope)" />
    </template>
    <el-color-picker
      v-model="selectValue"
      :class="attributes?.customClassName?.elModelClassName ?? ''"
      v-bind="attributes.elModel" />
  </el-form-item>
</template>
<script setup>
    import { computed } from 'vue'
    const props = defineProps({
    value: {
        type: [String, Number, Boolean, Date, Array],
        required: true
    },
    attributes: {
        type: Object,
        default: () => ({})
    }
    })
    const emit = defineEmits(['push-val'])
    const selectValue = computed({
    get() {
        return props.value
    },
    set(val) {
        emit('push-val', val)
    }
    })
</script>